﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using App.Utility;

namespace App.Account.Models.Forms
{
    public class RoleForm : IRuleEntity
    {
        public Guid? RoleID { get; set; }
        public string RoleName { get; set; }
        public int Level { get; set; }

        public List<RuleViolation> GetRuleViolations()
        {
            List<RuleViolation> validationIssues = new List<RuleViolation>();

            if (String.IsNullOrEmpty(RoleName))
            {
                validationIssues.Add(new RuleViolation()
                {
                    PropertyName = "RoleName",
                    ErrorMessage = "You must specify a rolename."
                });
            }

            return validationIssues;
        }
    }
}
